<?php
apf_require_controller("QaAbstract");
apf_require_class('Tools_Uploader');
class Qa_Finance_QaDeleteController extends QaAbstractController{
    public function handle_request(){
        $tag = Const_Qa::get_menu_list_en(Const_Qa::TAG_FINANCE);
        $params = $this->request->get_parameters();
        //权限判断
        if(!$_SESSION[$tag]){
            $this->show_tips("ERROR_PERMISSION", $_SERVER['HTTP_REFERER']);
        }
        //执行删除操作
        $this->_delete_question($params['qid']);
        //跳转到前一页面
        $this->response->redirect($_SERVER['HTTP_REFERER']);
    }

    /**
     * 删除操作
     * Enter description here ...
     */
    private function _delete_question($id){
        $this->get_question_bll()->delete_question($id);
    }

}
